package vashion.azeroth.common.im;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by xiaonan on 15/11/23.
 */
public class AppKeys {

	public static final String VASHION_PLATFORM="ios";
	public static final String VASHION_IOS_APPKEYS = "55b5729ffbbf175249b2b56ca431445f";
	public static final String VASHION_IOS_SECRET = "SBpv7dgv2O18BNGwKzbtfvoPWrTjXy9X";

	/***
	 * appkey与appsecret的对应
	 */
	public static Map<String, String> appkeys = new HashMap<String, String>();
	/***
	 * 设备类型与appkey的对应
	 */
	public static Map<String, String> devkeys = new HashMap<String, String>();

	/***
	 * domain信息
	 */
	public static final String domain = "vashion";

	/***
	 * server端的 appToken信息
	 */
	public static final String appToken = "SLhLOuVP3enH3BShgry75cH4U4nyc7zk";

	static {
//		appkeys.put("b63baeee1141365c0ce205f0396d26fd", "Sm97jL2uec48pEQhwT6XwMLQkugpnNbK"); //android
//		appkeys.put("c573dfcec919673dd504b5e60f4946c3", "SaFB0khFhM1YeLU6CCWcf7CpxP8oDRr4"); //ios
//		appkeys.put("7cbea69b6729c6ffe4b24fee1a6eb908", "SxaaKAIKE9V1Wgmu4nqs2UPV7hl47Lu4"); //web
		appkeys.put("55b5729ffbbf175249b2b56ca431445f", "SBpv7dgv2O18BNGwKzbtfvoPWrTjXy9X"); //ios
	}

	static {
//		devkeys.put("android", "b63baeee1141365c0ce205f0396d26fd"); //android
//		devkeys.put("ios", "c573dfcec919673dd504b5e60f4946c3"); //ios
//		devkeys.put("web", "7cbea69b6729c6ffe4b24fee1a6eb908"); //web
		devkeys.put(VASHION_PLATFORM, "55b5729ffbbf175249b2b56ca431445f"); //web
	}

	/**
	 * 获取appkey对应的appsecret信息
	 * @desc
	 * @time  2:59:41 pm
	 * @param appKey
	 * @return
	 */
	public static String getAppSecret(String appKey) {
		return appkeys.get(appKey);
	}

	public static String getAppSecretByDevType(String devType) {
		String appKey = devkeys.get(devType);
		return getAppSecret(appKey);
	}

	public static String getAppKeyByDevType(String devType) {
		return devkeys.get(devType);
	}
}
